@{
    Layout=null;
}
@using MvcDemo.Models
@model Product

<table>
    @if (Model==null)
    {
        <tr>
            <td>商品名称:<input type="text" name="productName" /></td>
        </tr>
         <tr>
            <td>供应商名称:<input type="text" name="supplier" /></td>
        </tr>
         <tr>
            <td>价格:<input type="text" name="price" /></td>
        </tr>
         <tr>
            <td>库存:<input type="text" name="stock" /></td>
        </tr>
         <tr>
            <td>备注:<input type="text" name="remarks" /></td>
        </tr>
    }else{
         <tr>
            <td>id:<input type="text" name="id" value="@Model.Id" /></td>
        </tr>
         <tr>
            <td>商品名称:<input type="text" name="productName" value="@Model.ProductName" /></td>
        </tr>
         <tr>
            <td>供应商名称:<input type="text" name="supplier" value="@Model.Supplier"/></td>
        </tr>
         <tr>
            <td>价格:<input type="text" name="srice" value="@Model.Price" /></td>
        </tr>
         <tr>
            <td>库存:<input type="text" name="stock" value="@Model.Stock" /></td>
        </tr>
         <tr>
            <td>备注:<input type="text" name="remarks" value="@Model.Remarks" /></td>
        </tr>
    }
    <tr>
        <td>
            <button onclick="btSave()">保存</button>
            <button onclick="btBack()">返回</button>
        </td>
    </tr>
</table>

<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/js/base.js"></script>